package view.shop
{
import flash.display.DisplayObject;
import flash.geom.Point;

import view.component.window.WindowComponent;
import view.interfaces.IShopUI;

/**
 * ShopUI
 * @author jliang
 * 
 */
public class ShopUI extends WindowComponent implements IShopUI
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function ShopUI()
	{
		super();
	}
    //==========================================================================
    //  Properties
    //==========================================================================
    public function get displayObject():DisplayObject
    {
        return this;
    }
    //==========================================================================
    //  Overridden methods: Component
    //==========================================================================
    override protected function get skinReference():String
    {
        return "swf.ui.ShopUISkin";
    }
    
    override protected function get proxyMapping():Array
    {
        return [ 
            { skin:"", classRef: ShopUIProxy, id:"window" }
        ];
    }
    
    override public function get width():Number
    {
        return 670;
    }
    
    override public function get height():Number
    {
        return 532;
    }
    //==========================================================================
    //  Public methods
    //==========================================================================	
    public function showShop(index:int = -1, itemKey:String = null):void
    {		
        ShopUIProxy(window).showShop(index);
    }
    
    public function refresh():void
    {
        ShopUIProxy(window).refresh();
    }
}
}